def power(x, n):
    s = 1
    while n > 0:
        n = n - 1
        s = s * x
    return s


a = power(2, 2)
print(a)
print(power(3, 3))

#### default params  默认参数必需是  【不可变对象】

def default_power(x,n=2):
    s = 1
    while n > 0:
        n = n - 1
        s = s * x
    return s

print(default_power(3))